package com.accp.demo.mapper.pruchase;

import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.accp.demo.pojo.purchase.PurchaseInquiry;
import com.accp.demo.pojo.purchase.PurchaseInquiryDetail;
import com.accp.demo.pojo.purchase.PurchaseOrder;
import com.accp.demo.pojo.purchase.PurchaseOrderDetail;

public interface IPurchaseOrderMapper {
	/**
	 * 新增订单的主从表
	 * @param order
	 * @return
	 */
	public Integer saveOrder(PurchaseOrder order);
	public Integer saveOrderDetail(PurchaseOrderDetail order);
	/**
	 * 根据询价主表的编号查询count
	 * @param id
	 * @return
	 */
	public Integer queryOrderCount(@Param("billNo") String id);
	public Integer queryOrderAllCount();
	/**
	 * 根据编号查询订单主表
	 * @param id
	 * @return
	 */
	public Set<PurchaseOrder> queryOrderInfo(@Param("num")Integer pagenum,@Param("size")Integer pagesize);
	
	/**
	 * 根据编号查询订单从表
	 * @param id
	 * @return
	 */
	public PurchaseOrderDetail queryOrderDetailInfo(String id);
	/**
	 * 删除从表
	 * @param id
	 * @return
	 */
	public Integer deleteDateil(String id);
	/**
	 * 修改主从表信息
	 * @param order
	 * @return
	 */
	public Integer updateOrder(PurchaseOrder order);
	
	/**
	 * 逻辑删除/修改单况 主表
	 * @param id
	 * @param state
	 * @return
	 */
	public Integer updateOrderDel(@Param("id")String id,@Param("state")Integer state,@Param("dk")String dk);
	/**
	 * 审核
	 * @param id
	 * @param state
	 * @return
	 */
	public Integer updateOrderSH(@Param("id")String id,@Param("date")String date,@Param("state")String state,@Param("man")String man);
	
	/**
	 * 根据编号查询询价主表
	 * @param id
	 * @return
	 */
	public PurchaseOrder queryOrderInfo(String id);
	
}
